<html>
<head>
    <meta charset="utf-8">
    <title>审核失败</title>
    <#assign base=request.contextPath  />
    <#setting  number_format="0.##"/>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${base}/backstage/layui/css/layui.css" media="all">
    <script src="${base}/sweep/js/mui.min.js"></script>
    <script src="${base}/backstage/layui/layui.js"></script>
    <script src="${base}/backstage/js/jquery-1.8.3.min.js"></script>
    <script>
        var base =  "${base}";
    </script>
    <script src="${base}/backstage/js/ipNameUrl.js"></script>
    <style>
        /*给数据表格加高*/
        .layui-table-cell{
            height:50%;
        }
    </style>
</head>
<body>
<form class="layui-form " action="" style="padding-left: 15px;">

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">原因</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入失败原因"  id="content" class="layui-textarea"></textarea>
        </div>
        </div>


<br>
<br>
    <div align="center">
        <button type="button" class="layui-btn" id="saveButton" style="width: 100%">保存</button>
    </div>
</form>
</body>
<script>
    layui.use(['form', 'layer', 'upload'], function () {
        var form = layui.form
            , layer = layui.layer
            , $ = layui.jquery
            , upload = layui.upload;


    })


    $("#saveButton").on("click", function () {


        if ($("#content").val()=="") {
            layer.msg("请填写原因！")
            return;
        }
        $.ajax({
            type: "POST",
            url: "${base}/admin/userInfo/error",
            data: {id:'${id}',content:$("#content").val()},
            success: function (data) {
                if (data.code === 200) {
                    layer.msg(data.msg)
                    setTimeout(function () {
                        var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                        parent.layer.close(index); //再执行关闭
                    }, 500)
                } else {
                    layer.msg(data.msg)
                }
            }
        });
    })



</script>
</html>


